import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqSArenaCrossMainToplistPlayerHelper } from "./SeqSArenaCrossMainToplistPlayerHelper";
import { SArenaServerKey } from "./SArenaServerKey";
type int = number;
//class SArenaCrossMainToplist
    
    export  class SArenaCrossMainToplist extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SArenaCrossMainToplist();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.crossServerId);
            this.serverKey.__write(arg1);
            SeqSArenaCrossMainToplistPlayerHelper.write(arg1, this.finalToplists);
            SeqSArenaCrossMainToplistPlayerHelper.write(arg1, this.myServerToplists);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.crossServerId = arg1.readInt();
            this.serverKey = new SArenaServerKey();
            this.serverKey.__read(arg1);
            this.finalToplists = SeqSArenaCrossMainToplistPlayerHelper.read(arg1);
            this.myServerToplists = SeqSArenaCrossMainToplistPlayerHelper.read(arg1);
            return;
        }

        public /* const */_type: int=375;

        public /* var */crossServerId: int;

        public /* var */serverKey: SArenaServerKey;

        public /* var */finalToplists: Array<any>;

        public /* var */myServerToplists: Array<any>;

        public static /* var */_regist: SArenaCrossMainToplist;
    }

            SArenaCrossMainToplist._regist = new SArenaCrossMainToplist(true);
        